package com.abcd.godating.utils.json;

import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.DeserializationContext;
import org.codehaus.jackson.map.DeserializationProblemHandler;
import org.codehaus.jackson.map.JsonDeserializer;

public class CustomDeserializationProblemHandler extends
		DeserializationProblemHandler {
	private static Log log = LogFactory
			.getLog(CustomDeserializationProblemHandler.class);

	public boolean handleUnknownProperty(DeserializationContext ctxt,
			JsonDeserializer<?> deserializer, Object beanOrClass,
			String propertyName) throws IOException, JsonProcessingException {
		
		log.error("The property \"" + propertyName + "\" is not found.");

		return true;
	}
}
